<?php
/**
 * Created by PhpStorm.
 * User: dong
 * Date: 2018/6/2
 * Time: 16:20
 */
namespace App\Services\ThirdPayments\BankTraits;

use App\Lib\BankMap;

trait HYUNBankMap
{
    private $bankMap = [
        BankMap::GONGSHANG  => '967',
        BankMap::NONGYE     => '964',
        BankMap::CHINABANK  => '963',
        BankMap::JIANSHE    => '965',
        BankMap::ZHAOSHANG  => '970',
        BankMap::PUFA       => '977',
        BankMap::GUANGFA    => '985',
        BankMap::JIAOTONG   => '981',
        BankMap::YOUZHEN    => '971',
        BankMap::ZHONGXIN   => '962',
        BankMap::MINSHENG   => '980',
        BankMap::GUANGDA    => '986',
        BankMap::HUAXIA     => '982',
        BankMap::XINGYE     => '972',
        BankMap::SHANGHAI   => '975',
        BankMap::PINGAN     => '978',
        BankMap::BEIJING    => '989'
    ];

    public function getBank($bankCode)
    {
        if (array_key_exists($bankCode, $this->bankMap)) {
            return $this->bankMap[$bankCode];
        } else {
            return '967';
        }
    }
}